const statusMap = {
  0: '启用',
  1: '禁用',
};

export const columns = [
  {
    title: '序号',
    dataIndex: 'index',
    width: 70,
    customRender: (text, record, index) => `${index + 1}`,
  },
  {
    dataIndex: 'createTime',
    title: '创建时间',
    ellipsis: true,
    width: 200,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'roleName',
    title: '角色名',
    ellipsis: true,
    width: 180,
  },
  {
    dataIndex: 'status',
    title: '状态',
    ellipsis: true,
    width: 150,
    customRender: (text) => statusMap[text] || '/',
  },
  {
    title: '操作',
    width: 100,
    align: 'center',
    fixed: 'right',
    dataIndex: 'operation',
    scopedSlots: {
      customRender: 'operation',
    },
  },
];
